package list_.set_;

import java.util.HashSet;

/**
 * @description:
 * @Author yyp
 * @time
 */
public class HashSet_ {
    public static void main(String[] args) {
        HashSet set = new HashSet();
        System.out.print(set.add("a")+" ");
        System.out.print(set.add("a")+" ");
        System.out.print(set.add("b")+" ");
        System.out.println(set.add("c"));

        HashSet set1 = new HashSet();
        System.out.print(set1.add(new String("a"))+" ");
        System.out.println(set1.add(new String("a")));

        HashSet set2 = new HashSet();
        System.out.print(set2.add(new Dog("a"))+" ");
        System.out.println(set2.add(new Dog("a")));
    }
}
class Dog{
    String dog;

    public Dog(String dog) {
        this.dog = dog;
    }
}
